//
//  HWBaseViewController.swift
//  HWanGame
//
//  Created by 王昌健 on 2021/12/7.
//  Copyright © 2021 94Wan. All rights reserved.
//

import UIKit

class HWBaseViewController: UIViewController {
//    var style:UIStatusBarStyle = .lightContent
    var navigationView:HWNavigationView!
    
    override var shouldAutorotate : Bool {
        return false
       }
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return .portrait
    }
    override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
        return .portrait
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        initView()
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.setNavigationBarHidden(true, animated: false)
//        IQKeyboardManager.shared.shouldResignOnTouchOutside = true
    }
//    override var preferredStatusBarStyle: UIStatusBarStyle {
//        return self.style
//    }

}
extension HWBaseViewController {
    func initView() -> Void {
        view.backgroundColor = .white
        
        navigationView = HWNavigationView()
        view.addSubview(navigationView)
        navigationView.snp.makeConstraints { make in
            make.left.right.equalTo(0)
            make.top.equalTo(0)
        }
        
        navigationView.backButtonClick = {
            self.navigationController?.popViewController(animated: true)
        }
    }
}

extension HWBaseViewController {
    
}
